package com.boil.qz.safekavass.web.request.param;

import com.boil.util.Constants;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;

/**
 * Created by ChenYong on 2017-04-13.
 * <br>
 * 首页广告列表的请求参数。
 */
public class HomeAdvertListParam extends Page2Param {
    /**
     * 创建人
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_50, message = "创建人的长度在0至50个字之间")
    private String homeAdCreatePerson;
    /**
     * 广告标题
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_500, message = "广告标题的长度在0至500个字之间")
    private String homeAdName;
    /**
     * 广告是否显示
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_1, message = "广告是否显示的长度在0至1之间")
    @Pattern(regexp = Constants.NUMBER_EMPTY_RE, message = ("广告是否显示" + Constants.NUMBER_RE_MSG))
    private String isShow;

    /**
     * 默认构造器。
     */
    public HomeAdvertListParam() {
        super();
    }

    public String getHomeAdCreatePerson() {
        return homeAdCreatePerson;
    }

    public void setHomeAdCreatePerson(String homeAdCreatePerson) {
        this.homeAdCreatePerson = homeAdCreatePerson;
    }

    public String getHomeAdName() {
        return homeAdName;
    }

    public void setHomeAdName(String homeAdName) {
        this.homeAdName = homeAdName;
    }

    public String getIsShow() {
        return isShow;
    }

    public void setIsShow(String isShow) {
        this.isShow = isShow;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("HomeAdvertListParam{");
        sb.append("startDate='").append(startDate).append('\'');
        sb.append(", homeAdCreatePerson='").append(homeAdCreatePerson).append('\'');
        sb.append(", iDisplayStart=").append(iDisplayStart);
        sb.append(", sEcho=").append(sEcho);
        sb.append(", endDate='").append(endDate).append('\'');
        sb.append(", homeAdName='").append(homeAdName).append('\'');
        sb.append(", iDisplayLength=").append(iDisplayLength);
        sb.append(", iColumns=").append(iColumns);
        sb.append(", isShow='").append(isShow).append('\'');
        sb.append(", iSortingCols=").append(iSortingCols);
        sb.append('}');
        return sb.toString();
    }
}